
            <h1>
              <?php echo $title; ?> 
              <br/>
              <small>
                |---- 团购图片信息 ----  
                <?php
                  if($user == 'admin')
                  {
                    echo '|---- <a href="' . site_url('groupadmin/newpic?group_id=') . $group_id . '">添加新图片</a> ----';
                    echo '|---- <a href="' . site_url('groupadmin') . '">返回团购列表</a> ----|';
                  }
                  if($user == 'store')
                    echo '|---- <a href="' . site_url('storeadmin/grouplist') . '">返回团购列表</a> ----|';
                ?> 
              </small>
            </h1>
            
          <div class="panel panel-default">
          <!-- Table -->
          <table class="table">
            <thead>
              <tr>
                <th>图片</th>
                <th>状态</th>
                <?php
                  if($user == 'admin')
                    echo '<th>操作</th>';
                ?>
              </tr>
            </thead>
            <tbody>
              <?php foreach ($piclist as $question_item): ?>
                <tr>
                  <td><a href="<?php echo base_url($question_item['pic_url']) ;?>">
                    <img src="<?php echo base_url($question_item['pic_url']) ;?>" width="500" />
                  </a></td>
                  <td>
                    <?php 
                      $state = $question_item['pic_state'];
                      if($state == 1)
                        echo "正常显示";
                      else if ($state == 2)
                        echo "已隐藏";
                      // else if ($state == 3)
                      //   echo "已删除";
                      else
                        echo "状态异常";
                    ?>
                  </td>
                  <td>
                  <!--
                    <a href='<?php echo site_url("groupadmin/updatepic?group_id=") . $question_item['group_id']; ?>'>
                      修改
                    </a>
                    /
                  -->
                    <?php
                      if($user == 'admin')
                      {
                        $state = $question_item['pic_state'];
                        if($state == 2)
                          echo "<a href='" . site_url("groupadmin/backpic?group_id=") . $question_item['group_id'] . "&pic_id=" . $question_item['group_pic_id'] . "'>显示</a>";
                        else
                          echo "<a href='" . site_url("groupadmin/hidepic?group_id=") . $question_item['group_id'] . "&pic_id=" . $question_item['group_pic_id'] . "'>隐藏</a>";
                      }
                    ?>
                  <!--
                    /
                    <?php
                    $state = $question_item['pic_state'];
                    if($state == 3)
                      echo "<a href='" . site_url("groupadmin/backpic?group_id=") . $question_item['group_id'] . "&pic_id=" . $question_item['group_pic_id'] . "'>回复</a>";
                    else
                      echo "<a href='" . site_url("groupadmin/deletepic?group_id=") . $question_item['group_id'] . "&pic_id=" . $question_item['group_pic_id'] . "'>删除</a>";
                    ?>
                  -->
                  </td>
                </tr>
              <?php endforeach ?>
            </tbody>
          </table>
        </div>
          
